<template>
  <el-container class="home-container">
    <Aside></Aside>
    <el-container>
      <el-header>
        <el-button type="info" @click="logout">退出登录</el-button>
        <el-avatar :src="imgUrl"></el-avatar>
        <el-avatar
          src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
        ></el-avatar>
      </el-header>
      <Category></Category>
    </el-container>
  </el-container>
</template>
<script>
// import User from  './user/index'
import Aside from "../components/Aside";
import Category from '../components/Category'
export default {
  data() {
    return {
      imgUrl: "../assets/light.png",
    };
  },
  components: {
    // User,
    Aside,
    Category
  },
  methods: {
    //退出登录，清空sessionStorage
    logout() {
      window.sessionStorage.clear();
      this.$router.push("/login");
    },
  },
};
</script>
<style>
.el-header {
  /* background-color: rgb(32, 28, 28); */
  display: flex;
  justify-content: space-between;
  padding-left: 0;
  align-items: center;
  color: aliceblue;
  font-size: 20px;
}

</style>